/*
 * Project it.battlehorse.rcp.tools.log
 * Created on Mar 29, 2006
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * A copy of the LGPL is available also at
 * http://www.gnu.org/copyleft/lesser.html
 * 
 */ 
package it.battlehorse.rcp.tools.log.internal;

import it.battlehorse.rcp.tools.log.ILoggable;
import it.battlehorse.rcp.tools.log.LogActivator;
import it.battlehorse.rcp.tools.log.views.ActorLogLabelProvider;

import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.swt.graphics.Image;


/**
 * Defines the label provider which is able to display {@link ILoggable} elements inside
 * {@link LogItemDialog} instances.
 * 
 * @author battlehorse
 * @since Mar 29, 2006
 */
public class LogItemLabelProvider extends ActorLogLabelProvider {
	
	@Override
	public Image getColumnImage(Object element, int columnIndex) {
		if (columnIndex == 0) {
			return LogActivator.getDefault().getImageRegistry().get(LogActivator.IMAGE_KEY);
		}
		else
			return super.getColumnImage(element, columnIndex-1);
	}

	@Override
	public String getColumnText(Object element, int columnIndex) {
		if (columnIndex == 0) {
			return null;
		}
		else
			return super.getColumnText(element, columnIndex-1);
	}

	@Override
	public void addListener(ILabelProviderListener listener) {
		super.addListener(listener);

	}

	@Override
	public void dispose() {
		super.dispose();

	}

	@Override
	public boolean isLabelProperty(Object element, String property) {
		return super.isLabelProperty(element, property);
	}

	@Override
	public void removeListener(ILabelProviderListener listener) {
		super.removeListener(listener);
	}

}
